package com.itheima.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.itheima.entity.Result;
import com.itheima.service.CompanyAddrService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/map")

public class MobileMapController {
    @Reference
    CompanyAddrService companyAddrService;

    //查询门店地址
    @RequestMapping("/findAllAddr")
    public Result findAllAddr() {

        try {
            List<String> addrList =  companyAddrService.findAllAddr();
            return new Result(true,"true",addrList);
        } catch (Exception e) {
            e.printStackTrace();
            return  new Result(false,"false");
        }
    }

}
